﻿@model List<KidChoreApp.DataModels.Chore>

<h2>Chores List</h2>

<table class="table table-hover table-bordered table-striped">
    <tr>
        <th>Chore Name</th>
        <th>Chore Room</th>
        <th>Is Chore Finished?</th>
        <th>Is Chore Recurring</th>

    </tr>
    @foreach (var c in @Model)
    {
        <tr onclick="location.href='/Chore/ChoreDetail/@c.Id'">
            <td>@c.Name</td>
            <td>@c.Room</td>
            @if(c.IsDone){
            <td>Yes</td>
            }else{
            <td>No</td>
            }
            @if(c.IsRecurring){
            <td>Yes</td>
            }else{
            <td>No</td>
            }
        </tr>
    }

</table>
<div>
    <button class="btn btn-success btn-block" onclick="location.href='/Chore/AddChore'">Add New Chore</button>
</div>